using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[RequireComponent(typeof(SpriteRenderer))]
public class Revolver:Weapon {

	public Revolver(WeaponData data) : base(data) { }

	protected override void DoRecoil(ShotStats stat) {
		base.DoRecoil(stat);
		if(slot.inAfterAttack)
			slot.SetAttackIndex(1);
	}

}

public class AltFireCloseUpShot:AltFireShoot {

	protected override void Weapon_Shooting(object sender,ShootEventArgs e) {
		base.Weapon_Shooting(sender,e);
		if(e.stat.shotTag!="altFire0") return;
		weapon.ShootFromMuzzle(ProjectileData.nameToData["HalfShockwave"],e.stat.consumedAmmos);
	}
	protected override void Weapon_AmmoConsumptionDeciding(object sender,ShootEventArgs e) {
		if(e.stat.shotTag!="altFire0") return;
		e.stat.recoil.baseValue=2;
		e.stat.cooldownTime.baseValue=0;
		e.stat.projectileCount.baseValue=2;
		e.stat.ammoConsumption.AddMultiply(2,0);
	}

	protected override void Projectile_Firing(object _sender,ProjectileEventArgs e) {
		if(!isShooting) return;
		e.stat.damage.AddMultiply(0.65f,0);
		e.stat.inaccuracy.AddAdd(20,0);
	}

}
